<?php
/*
Plugin Name: Ivone Hello World
Plugin URI: https://gitee.com/katy/Ivone-Hello-World.git
Description: 这个是一个研发插件入门的一个案列插件。在启用后，在您站点后台每个页面的右上角都可以看到 Hello World
Version:  1.0
Author: Ivone
Author URI:  http://zzcomm.com
License: A "Slug" license name e.g. GPL2
*/
/*  Copyright 2017-09-26  Ivone  (email : ivone_92@163.com)
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
function hello_word() {
	echo "<p id='Ivone'>Hello World</p>";
}
// Now we set that function up to execute when the admin_head action is called
add_action( 'admin_head', 'hello_word' );

// We need some CSS to position the paragraph
function Ivone_css() {
	// This makes sure that the positioning is also good for right-to-left languages
	$x = is_rtl() ? 'left' : 'right';

	echo "
	<style type='text/css'>
	#Ivone {
		float: $x;
		padding-$x: 15px;
		padding-top: 5px;		
		margin: 0;
		font-size: 11px;
	}
	</style>
	";
}

add_action( 'admin_head', 'Ivone_css' );
